package com.innovapost.demo;

import java.io.PrintStream;

public class HelloWorld {

	private final PrintStream out;

	public HelloWorld(PrintStream out) {
		this.out = out;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println("--------------------------");
		HelloWorld helloWorld = new HelloWorld(System.out);
		helloWorld.saySomething(10);
		System.out.println("--------------------------");
	}

	private void saySomething(int n) {
			sayHello();
			askAQuestion();
			sayGoodbye();
	}

	private void sayHello() {
		printMessage(out, "Hello World");
	}

	private void askAQuestion() {
		printMessage(out, "How are you feeling today?");
	}
	
	private void sayGoodbye() {
		printMessage(out, "Goodbye, Lovely World....");
	}
	
	private void printMessage(PrintStream printStream, String message) {
		printStream.println(message);
	}

}
